<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<h:html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<h:title>
		<h:outputText value="Statistika tečajnic BANST" />
	</h:title>
</h:head>

<h:body>
	<p:layout fullPage="true">
		<p:growl showDetail="true" sticky="true" />
		<p:ajax event="toggle" update=":prikaz" />

		<p:layoutUnit position="north" collapsible="true">
			<p
				style="color: black; font-weight: bold; margin: 0px; font-size: 48pt; text-align: center">BANST</p>
			<p
				style="color: #4d4d4d; margin: 0px; font-size: 19pt; text-align: center">Bančne
				storitve</p>
		</p:layoutUnit>
		<p:layoutUnit position="west" size="400" header="Parametri prikaza"
			collapsible="true">
			<h:form>
				<p:button style="width:390px" value="Uporabnik: #{facesContext.externalContext.remoteUser}" />
				<p:accordionPanel>
					<p:tab title="Začetni datum">
						<p:calendar value="#{statistikaBean.zacetniDatum}" mode="inline" />
					</p:tab>
					<p:tab title="Končni datum">
						<p:calendar value="#{statistikaBean.koncniDatum}" mode="inline" />
					</p:tab>
					<p:tab title="Tečajna lista">
						<p:selectOneListbox value="#{statistikaBean.sifraIzbraneVrste}"
							layout="pageDirection">
							<f:selectItems value="#{statistikaBean.vrsteTecajnic}" var="vt"
								itemLabel="#{vt.nazivVrsteTecajnice}"
								itemValue="#{vt.sifraVrsteTecajnice}" />
						</p:selectOneListbox>
					</p:tab>
					<p:tab title="Valuta">
						<p:selectManyCheckbox value="#{statistikaBean.izbraneValute}"
							layout="pageDirection">
							<f:selectItems value="#{statistikaBean.valute}" var="valuta"
								itemLabel="#{valuta.oznakaValute}"
								itemValue="#{valuta.sifraValute}" />
						</p:selectManyCheckbox>
					</p:tab>
					<p:tab title="Vrsta vrednosti">
						<p:selectOneListbox value="#{statistikaBean.vrstaVrednosti}"
							layout="pageDirection">
							<f:selectItem itemLabel="Srednji tečaj" itemValue="1" />
							<f:selectItem itemLabel="Nakupni tečaj" itemValue="2" />
							<f:selectItem itemLabel="Prodajni tečaj" itemValue="3" />
						</p:selectOneListbox>
					</p:tab>
				</p:accordionPanel>
				<br />
				<p:commandButton value="Osveži prikaz" update=":prikaz"
					style="width:390px" />
			</h:form>
		</p:layoutUnit>

		<p:layoutUnit position="center">
			<h:form id="prikaz">
				<p:growl showDetail="true" sticky="true" />
				<p:lineChart id="linear" value="#{statistikaBean.linearenGraf}"
					legendPosition="e" title="Grafični prikaz vrednosti tečajev"
					style="height:600px" xaxisAngle="90" />
			</h:form>
		</p:layoutUnit>
	</p:layout>
</h:body>
</h:html>